﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SimpleData.Infrastructure.Provider;
using System.Reflection;
using SimpleData.ObjectModel;

namespace System.Collections.Generic
{
	/// <summary>
	/// Métodos helpers
	/// </summary>
	public static class AssemblyLoaderProbeExtensios
	{

		public static void Add<TData, TPlugin>( this IList<ProviderBase<TData, TPlugin>.AssemblyLoaderProbe> assemblies, Assembly asm )
			where TData : IDataObjectName
			where TPlugin : class
		{
			assemblies.Add( new ProviderBase<TData, TPlugin>.AssemblyLoaderProbe( asm ) );
		}

		public static void Add<TData, TPlugin>( this IList<ProviderBase<TData, TPlugin>.AssemblyLoaderProbe> assemblies, Assembly asm, string sufix )
			where TData : IDataObjectName
			where TPlugin : class
		{
			assemblies.Add( new ProviderBase<TData, TPlugin>.AssemblyLoaderProbe( asm, sufix ) );
		}
	}
}
